package com.acme.gprs.server;


public enum GPRSCommand {
	AUTO_EVENT_REPORT("AAA"),
	TRACK_ON_DEMAND("A10"), 		
	STATUS_PORT("A10"),
	SET_HEARTBEAT_INTERVAL("A11"),
	TRACK_BY_TIME_INTERVAL("A12"), 
	OPEN_PORT("C01"),
	CLOSE_PORT("C01");
	
	private String code;
	
	private GPRSCommand(String code){
		this.code = code;
	}
	public String getCode() {
		return code;
	}
	
	public static GPRSCommand getGPRSCommandByCode(String code){
		for(GPRSCommand c : GPRSCommand.values()){
			if(c.getCode().equals(code)){
				return c;
			}
		}
		return null;
	}
}
